package com.tyl.xtk.config;

import com.wf.captcha.SpecCaptcha;
import com.wf.captcha.base.Captcha;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class CaptchaConfig {

    @Bean
    public Captcha captcha() {
        SpecCaptcha specCaptcha = new SpecCaptcha(120, 40, 4);
        specCaptcha.setCharType(2); // 2表示数字和大写字母
        return specCaptcha;
    }
}